<?php
/**
 * Created by JetBrains PhpStorm.
 * User: shaoshuai
 * Date: 11/3/11
 * Time: 3:02 下午
 * To change this template use File | Settings | File Templates.
 */

date_default_timezone_set('PRC');
define('PB_DEBUG', true);
define('PB_ROOT', dirname(dirname(__FILE__)) . '/');
define('PB_ROOT_ADMIN', PB_ROOT . 'admin/');
define('PB_ROOT_DATA', PB_ROOT_ADMIN . 'data/');
define('PB_ROOT_DATA_POSTS', PB_ROOT_DATA . 'posts/');

define('PB_HTML_INDEX', PB_ROOT);
define('PB_HTML_POST', PB_ROOT . 'post/');
define('PB_HTML_CATEGORY', PB_ROOT . 'category/');
define('PB_HTML_TAG', PB_ROOT . 'tag/');

/**
 * @param string $content message to log
 * @return void
 */
function pbLog($content)
{
    $date = date('Y-m-d H:i:s');
    file_put_contents(PB_ROOT_ADMIN . 'system.log', $date . "\t" . $content . "\n", FILE_APPEND);
}

include_once 'common.func.php';
include_once 'admin.func.php';